<template>
	<view :class="list.length==0?'content':''">
		<view class="" style="height: 100rpx;"></view>
		<view class="title">
			<view :class="titindex==''?'active':''" @click="settitindex('')"><text>全部</text></view>
			<view :class="titindex==1?'active':''" @click="settitindex(1)"><text>新任务</text></view>
			<view :class="titindex==5?'active':''" @click="settitindex(5)"><text>待取货</text></view>
			<view :class="titindex==2?'active':''" @click="settitindex(2)"><text>配送中</text></view>
			<view :class="titindex==3?'active':''" @click="settitindex(3)"><text>已完成</text></view>
			<view :class="titindex==4?'active':''" @click="settitindex(4)"><text>已取消</text></view>
		</view>

		<template v-if="list.length!=0">
			<view class="listbg" style="margin-top: 30rpx;" v-for="(item,index) in list" :key="index">
				<view class="listitem" style="padding-bottom: 30rpx;border-top: none;" @click="goinfo(item.id)">
					<view class="tit">
						<view style="display: flex;align-items: center;">
							<image src="../static/icon_279@2x.png" mode=""></image>
							<text style="display: block;">
								<text> 预约配送时间 : {{(item.groupOrder.delivery_day || '--:--:--')}}</text>
								<text
									style="margin-left: 20rpx;">{{(item.groupOrder.delivery_time_scope || '--:--:--')}}</text>
							</text>
						</view>
						<text>{{getTitle(item.task_type,item.status)}}</text>
					</view>
					<view class="houtai">后台指定</view>
					<!-- 正常订单 -->
					<view class="addressbox" v-if="item.task_type == 2">
						<view class="add_l">
							<view class="qu">取</view>
							<text>|</text>
							<text
								v-if="item.status == 1 || item.status == 2 || item.status == 5">{{item.juli || '0'}}m</text>
							<text v-else>-</text>
							<text>|</text>
							<view class="">收</view>
						</view>
						<view class="add_r">
							<view class="" @click.stop="getmap(item.market.latitude,item.market.longitude)">
								<text>{{item.market.address || '菜市场地址获取失败'}}</text>
								<image src="../static/icon_280@2x.png" mode=""></image>
							</view>
							<view class="" @click.stop="getmap(item.groupOrder.latitude,item.groupOrder.longitude)">
								<text>{{item.groupOrder.user_address || '收货地址获取失败'}}</text>
								<image src="../static/icon_280@2x.png" mode=""></image>
							</view>
						</view>
					</view>
					<!-- 退换货订单 -->
					<view class="addressbox" v-if="item.task_type == 3 || item.task_type == 5">
						<view class="add_l">
							<view class="qu">取</view>
							<text>|</text>
							<text
								v-if="item.status == 1 || item.status == 2 || item.status == 5">{{item.juli || '0'}}m</text>
							<text v-else></text>
							<text>|</text>
							<view class="">收</view>
						</view>
						<view class="add_r" v-if="item.task_type == 3">
							<view class="" @click.stop="getmap(item.groupOrder.latitude,item.groupOrder.longitude)">
								<text>{{item.groupOrder.user_address || '取货地址获取失败'}}</text>
								<image src="../static/icon_280@2x.png" mode=""></image>
							</view>
							<view class="" @click.stop="getmap(item.market.latitude,item.market.longitude)">
								<text>{{item.market.address || '菜市场地址获取失败'}}</text>
								<image src="../static/icon_280@2x.png" mode=""></image>
							</view>
						</view>
						<view class="add_r" v-else>
							<view class="" @click.stop="getmap(item.market.latitude,item.market.longitude)">
								<text>{{item.market.address || '菜市场地址获取失败'}}</text>
								<image src="../static/icon_280@2x.png" mode=""></image>
							</view>
							<view class="" @click.stop="getmap(item.groupOrder.latitude,item.groupOrder.longitude)">
								<text>{{item.groupOrder.user_address || '取货地址获取失败'}}</text>
								<image src="../static/icon_280@2x.png" mode=""></image>
							</view>
						</view>
					</view>

					<!-- 物品总类大于1时 -->
					<template v-if="item.allShoppingList.length > 1">
						<view class="shopname"><text class="gray">{{item.market.mar_name || '暂无'}}</text><text
								class="gray">下单时间: {{item.groupOrder.create_time || '暂无'}}</text></view>
						<view class="goods">
							<view class="imgbg">
								<image v-for="(ele,i) in item.allShoppingList" :key="i" :src="ele" v-if="i<4"></image>
								<image class="dian" v-if="item.allShoppingList.length>=4"
									src="../static/icon_296@2x.png" mode=""></image>
							</view>
							<view class="price" v-if="! item.RefundInfo">
								<view class="">￥<text>{{item.groupOrder.pay_price || '0'}}</text></view>
								<text>共{{item.proudctNumCount || '#'}}件</text>
							</view>
							<view class="price" v-else>
								<view class="">￥<text>{{item.RefundInfo.refund_price || '0'}}</text></view>
								<text>共{{item.RefundInfo.refund_num || '1'}}件</text>
							</view>
						</view>
					</template>
				</view>
				<view class="listitem" @click.stop="goinfo(item.id)" v-if="item.allShoppingList.length <= 1">
					<view class="goods goods2" style="align-items: flex-start;">
						<image :src="item.allShoppingList[0]"></image>
						<view class="one">
							<text>{{item.shoppingText[0] || '暂无'}}</text>
							<text style="margin-top: 12rpx;" class="gray">下单时间:
								{{item.groupOrder.create_time || '暂无'}}</text>
						</view>
						<view class="price price2" v-if="! item.RefundInfo">
							<view class="">￥<text>{{item.groupOrder.pay_price || '0'}}</text></view>
							<text>共{{item.proudctNumCount || '1'}}件</text>
						</view>
						<view class="price price2" v-else>
							<view class="">￥<text>{{item.m_ || '0'}}</text></view>
							<text>共{{item.RefundInfo.refund_num || '1'}}件</text>
						</view>
						
					</view>
				</view>
				<!--  正常订单 -->
				<template v-if="item.task_type == 2">
					<!-- 新任务 -->
					<view class="goodsbtn" v-if="item.status == 1">
						<view @click.stop="getTask(item.id)" class="">接受任务</view>
					</view>
					<!-- 配送中 -->
					<view class="goodsbtn" v-if="item.status == 2">
						<view class="call" @click.stop="tel(item.ServiceInfo.phone)">联系客服/一键拨号</view>
						<view class="" @click.stop="distribution(item.id)">配送完成</view>
					</view>
					<!-- 取货完成 -->
					<view class="goodsbtn" v-if="item.status == 5">
						<view @click.stop="getGoods(item.id)" class="">取货完成</view>
					</view>
					<!-- 取货完成 -->
					<view class="goodsbtn" v-if="item.status == 3">
						<view @click.stop="lookComment(item)" class="">查看评论</view>
					</view>
				</template>
				<!-- 退换货订单 -->
				<template v-if="item.task_type == 3 || item.task_type == 5">
					<!-- 新任务 -->
					<view class="goodsbtn" v-if="item.status == 1">
						<view @click.stop="getTask(item.id)" class="">接受任务</view>
					</view>
					<!-- 配送中 -->
					<view class="goodsbtn" v-if="item.status == 2">
						<view class="" @click.stop="distribution(item.id)">送货完成</view>
					</view>
					<!-- 取货完成 -->
					<view class="goodsbtn" v-if="item.status == 5">
						<view @click.stop="getGoods(item.id)" class="">取货完成</view>
					</view>
				</template>
			</view>
		</template>
		<view class="nomore" v-else>
			<image src="../static/icon_294@2x.png" mode=""></image>
			<text>暂时没有任何订单</text>
			<text>稍等一会儿再来吧</text>
		</view>
		<!-- 接单状态 -->
		<view class="center" v-if="userinfo2">
			<image src="../static/icon_295@2x.png" mode="" @click.stop="changezt(3)" v-if="userinfo2.staff_status==1">
			</image>
			<image src="../static/icon_303@2x.png" mode="" @click.stop="changezt(1)" v-else></image>
		</view>
		<!-- 底部tabbar -->
		<view class="" id='tab'>
			<u-tabbar :value="value" :fixed="true" :placeholder="true" activeColor="#109C7A">
				<block v-for="(item,index) in tabbar" :key='index'>
					<u-tabbar-item :text="item.name" @click="switchtab(item.url)">
						<image class="u-page__item__slot-icon" slot="active-icon" :src="item.checked_icon">
						</image>
						<image class="u-page__item__slot-icon" slot="inactive-icon" :src="item.no_checked_icon">
						</image>
					</u-tabbar-item>
				</block>
			</u-tabbar>
		</view>
	</view>
</template>

<script>
	export default {

		data() {
			return {
				userinfo2: '',
				value: 0,
				titindex: '',
				loadingType: 0, //分页
				goData: {
					status: '',
					page: 1,
					delivery_date: '', //时间段
				}, //提交信息
				list: [],
				tabbar: [{
						name: '订单中心',
						checked_icon: '../static/cpm_tab-icon_1@3x.png',
						no_checked_icon: '../static/cpm_tab-icon_3@3x.png',
						url: '/P_rider/order_center/index'
					},
					{
						name: '个人中心',
						checked_icon: '../static/cpm_tab-icon_2@3x.png',
						no_checked_icon: '../static/cpm_tab-icon_4@3x.png',
						url: '/P_rider/mine/index'
					}
				]
			}
		},
		watch: {
			//监听状态栏
			titindex(newValue) {
				this.loadingType = 0;
				this.goData.page = 1;
				this.list = [];
				this.getuserinfo();
			}
		},
		onLoad() {

		},
		onShow() {
			this.goData.page = 1;
			this.loadingType = 0;
			this.list = [];
			// 更新买手位置
			this.getdingwei();
			clearInterval(getApp().globalData.time99);
			getApp().globalData.time99 = setInterval(e => {
				this.getdingwei();
			}, 30000);
			// 获取列表
			this.getuserinfo();
			this.getuserinfo2()
		},
		//上拉加载
		onReachBottom: function() {
			if (this.loadingType == 2) {
				return uni.showToast({
					title: '没有更多了',
					icon: 'none'
				})
			}
			if (this.loadingType != 0) { //loadingType!=0;直接返回
				return false;
			}
			this.goData.page++;
			uni.showNavigationBarLoading(); //显示加载动画				
			this.getuserinfo(); //请求
		},
		methods: {
			// 切换状态
			changezt(e) {
				let that = this
				uni.showModal({
					title: '提示',
					content: '是否切换状态',
					success: function(res) {
						if (res.confirm) {
							that.$request("rider/set_status", {
								status: e
							}, 'GET').then(res => {
								that.getuserinfo2()
							})
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
			getuserinfo2() {
				this.$request('user', {}, 'GET').then(res => {
					console.log(res, '信息');
					this.userinfo2 = res.data
				})
			},
			// 查看评论
			lookComment(item) {
				let data = JSON.stringify(item);
				uni.setStorageSync('data66', data);
				uni.navigateTo({
					url: '../mine/evaluate_look'
				})
			},
			// 打电话
			tel(phone) {
				console.log(phone);
				uni.makePhoneCall({
					phoneNumber: `${phone}` //仅为示例
				});
			},
			//更改状态
			changeStatus(status) {
				this.$request('rider/set_status', {
					status
				}, 'GET').then(res => {
					console.log(res, '任务');
					if (res.status == 200) {
						this.fromData = res.data;
						console.log(this.fromData)
						// this.fromData.staff_status = res.data.
					}
				})
			},
			//配送完成
			distribution(task_id) {
				uni.showModal({
					title: '提示',
					content: '确认配送完成吗?',
					success: res => {
						if (res.confirm) {
							this.$request('rider/finish', {
								task_id,
							}, 'POST').then(ele => {
								console.log(ele, 'ele');
								if (ele.status == 200) {
									this.titindex = 3;
								}
							})
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
			// 接受新任务
			getTask(task_id) {
				
				uni.requestSubscribeMessage({
					tmplIds: ['8weYiNMM30JxdGsHWDAVR8OZmtUFS0NtYHnmITPa_J4'],
					success:re=> {
						uni.showModal({
							title: '提示',
							content: '确认接单吗?',
							success: res => {
								if (res.confirm) {
									this.$request('rider/accept', {
										task_id,
									}, 'POST').then(ele => {
										console.log(ele, 'ele');
										if (ele.status == 200) {
											this.titindex = 5;
										}
									})
								} else if (res.cancel) {
									console.log('用户点击取消');
								}
							}
						});
					},
					fail:err=> {
						uni.showModal({
							title: '提示',
							content: '确认接单吗?',
							success: res => {
								if (res.confirm) {
									this.$request('rider/accept', {
										task_id,
									}, 'POST').then(ele => {
										console.log(ele, 'ele');
										if (ele.status == 200) {
											this.titindex = 5;
										}
									})
								} else if (res.cancel) {
									console.log('用户点击取消');
								}
							}
						});
					}
				})
				
				
				
			
				
				
				
			},
			//取货完成
			getGoods(task_id) {
				uni.showModal({
					title: '提示',
					content: '确认取货完成吗?',
					success: res => {
						if (res.confirm) {
							this.$request('rider/pickUp', {
								task_id,
							}, 'POST').then(ele => {
								console.log(ele, 'ele');
								if (ele.status == 200) {
									this.titindex = 2;
								}
							})
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
			//经纬度算距离
			// 根据经纬度计算距离 lat1, lng1, lat2, lng2, index
			getDistance() {
				this.list.forEach(async (e, index) => {
					let a = await new Promise((resolve, reject) => {
						uni.request({
							url: `https://restapi.amap.com/v4/direction/bicycling?origin=${e.market.longitude},${e.market.latitude}&destination=${e.groupOrder.longitude},${e.groupOrder.latitude}&key=c858b6921758e3f3400070929386564c`,
						}).then((response) => {
							console.log(response[1].data.data.paths[0].distance, 'ss');
							this.$set(this.list[index], 'juli', response[1].data.data.paths[0]
								.distance * 1);
						}).catch(error => {})
					})
				})
			},
			// 打开地图导航
			getmap(latitude, longitude) {
				uni.openLocation({
					latitude: latitude * 1,
					longitude: longitude * 1,
					success: function() {
						console.log('success');
					}
				});
			},
			getuserinfo() {
				this.$request('rider/task_list', {
					...this.goData
				}, 'GET').then(res => {
					console.log(res, '订单列表');
					if (res.status == 200) {

						this.list.push(...res.data.data);
						console.log(this.list, 'list');
						uni.hideNavigationBarLoading(); //关闭加载动画
						//如果长度小于等于0说明没有分页
						if (res.data.data.length < 15) {
							this.loadingType = 2; //没有更多了	
						} else {
							this.loadingType = 0; //请求成功让他返回上拉加载	
						}
						// 循环外层任务订单  
						this.list.forEach((ele, index) => {
							ele.m_ = 0
							ele.refundProudctIds = [] //任务退换货 
							ele.proudctNumCount = 0
							let shoppingList = []; //商品图片
							let shoppingText = []; //介绍
							if (ele.RefundInfo) {
								ele.RefundInfo.refundProduct.forEach(refundProduct => {
									ele.refundProudctIds.push(refundProduct.order_product_id)
								})
							}
							ele.groupOrder.orderList.forEach(ele2 => {
								//商品图片
								ele2.orderProduct.forEach(ele4 => {
									let isShow = ele.refundProudctIds.indexOf(
										ele4.order_product_id)
									if (ele4.cart_info.product.image && (isShow != -1 ||
											ele.task_type == 2)) {
												
										ele.m_ += Number(ele4.product_price)
										shoppingList.push(
											ele4.cart_info.product.image);
										shoppingText.push(
											ele4.cart_info.product.store_name);
										ele.proudctNumCount += Number(ele4.product_num)
									}
								})
							})
							ele.m_ = ele.m_.toFixed(2)
							this.$set(this.list[index], 'allShoppingList', shoppingList);
							this.$set(this.list[index], 'shoppingText', shoppingText);
						})
						this.getDistance();
					}
				})
			},
			getTitle(type, index) {
				// 状态名获取-0待指定 1待接收任务、2执行中、3任务完成、4取消任务 5骑手待配送
				//1买手任务  2骑手送货任务 3骑手退货单 4买手换货单 5骑手换货单
				let task_type = type == 2 ? '送货' : (type == 3 ? '退货' : '换货');
				switch (index * 1) {
					case 1:
						return task_type + '-新任务';
					case 2:
						return task_type + '-配送中';
					case 3:
						return task_type + '-已完成';
					case 4:
						return task_type + '-已取消';
					case 5:
						return task_type + '-待取货';
				}




			},
			//更新买手定位
			getdingwei() {
				uni.getLocation({
					type: 'gcj02 ',
					success: res => {
						console.log('当前位置的经度：' + res.longitude);
						console.log('当前位置的纬度：' + res.latitude);
						this.$request('update_gps', {
							longitude: res.longitude,
							latitude: res.latitude,
						}, 'POST').then(ele => {
							console.log(ele, 'ele');
						})
					}
				});
			},
			goinfo(id) {
				uni.navigateTo({
					url: "./orderinfo?id=" + id
				})
			},
			settitindex(e) {
				this.titindex = e
				this.goData.status = e
			},
			switchtab(e) {
				uni.redirectTo({
					url: e
				})
			},

		}
	}
</script>


<style>
	.qu {
		color: #F45E14 !important;
		background: #FFE8DC !important;
	}

	.addressbox {
		display: flex;
		width: 690rpx;
		margin-left: 20rpx;
	}

	.add_r {
		flex: 1;
		margin-left: 12rpx;
	}

	.add_r>view {
		display: flex;
	}

	.add_r>view:nth-of-type(2) {
		margin-top: 30rpx;
	}

	.add_r>view text {
		font-size: 30rpx;
		font-family: Microsoft YaHei;
		font-weight: bold;
		color: #333333;
		width: 480rpx;
	}

	.add_r>view image {
		width: 36rpx;
		height: 36rpx;
		margin-left: 50rpx;
	}

	.add_l {
		display: flex;
		flex-direction: column;
		align-items: center;
		margin-top: 8rpx;
	}

	.add_l>view {
		width: 44rpx;
		height: 26rpx;
		background: #D6FFF5;
		border-radius: 4rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 22rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #109C7A;
	}

	.add_l>text {
		font-size: 20rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #666666;
	}

	.houtai {
		font-size: 22rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #999999;
		margin-top: 10rpx;
		margin-bottom: 10rpx;
		margin-top: 10rpx;
		margin-left: 100rpx;
	}



	.shopname {
		display: flex;
		justify-content: space-between;
		align-items: center;
		box-sizing: border-box;
		padding-left: 30rpx;
		padding-right: 30rpx;
		margin-top: 20rpx;
		margin-bottom: 20rpx;
	}

	.listbg {
		width: 690rpx;
		margin-left: 30rpx;
		font-size: 24rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		background: #FFFFFF;
		color: #333333;
		padding-bottom: 30rpx;
		border-radius: 30rpx;

	}

	.realpay {
		font-size: 24rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #333333;
		display: flex;
		justify-content: flex-end;
		align-items: baseline;
		margin-top: 6rpx;
	}

	.realpay text {
		font-size: 36rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #333333;
	}

	.goodsbtn {
		width: 100%;
		display: flex;
		justify-content: flex-end;
		box-sizing: border-box;
		padding: 0 30rpx;
	}

	.goodsbtn>view {
		width: 260rpx;
		height: 60rpx;
		background: linear-gradient(64deg, #2BCCA5, #22B591);
		box-shadow: 0px 4rpx 6rpx 0px rgba(20, 187, 146, 0.4);
		border-radius: 10rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 24rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #FFFFFF;
	}

	.goodsbtn .call {
		width: 214rpx;
		height: 60rpx;
		background: #FFFFFF;
		border: 1rpx solid #CCCCCC;
		border-radius: 10rpx;
		font-size: 22rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #333333;
		box-shadow: none;
		margin-right: 20rpx;
	}

	.listitem {
		width: 690rpx;
		height: auto;
		background: #FFFFFF;
		box-sizing: border-box;
		padding-top: 20rpx;
		border-top: 1rpx solid #e2e2e2;
	}

	.tit {
		display: flex;
		justify-content: space-between;
		font-size: 26rpx;
		align-items: center;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #333333;
		height: 64rpx;
		align-items: center;
		width: 100%;
		border-bottom: 1rpx solid #EEEEEE;
		box-sizing: border-box;
		padding-left: 30rpx;
		padding-right: 30rpx;
		/* padding-bottom: 20rpx; */
	}

	.tit>view>image {
		width: 24rpx;
		height: 24rpx;
		margin-right: 10rpx;
	}

	.tit>text {
		font-size: 26rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #F83535;
	}

	/* 		<view class="tit">
					<view class="">
						<image src="../static/icon_279@2x.png" mode=""></image>
						<text>预约配送时间: 2021.12.6 14:00-16:00</text>
					</view>
					<text>待帮买</text>
				</view> */



	.gray {
		font-size: 22rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #999999;
	}

	.price2>view,
	.price2>view text {
		font-size: 26rpx !important;
		font-family: Microsoft YaHei;
		font-weight: 400 !important;
		color: #333333 !important;
	}

	.price2>text {
		margin-top: 4rpx;
		font-size: 22rpx !important;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #999999 !important;
	}

	.goods2>image {
		width: 140rpx;
		height: 140rpx;
		border-radius: 10rpx;
		/* background: #18BC37; */
		margin-right: 20rpx;

	}

	.one {
		display: flex;
		flex-direction: column;
	}

	.one>text:nth-of-type(1) {
		font-size: 26rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #333333;
		line-height: 36rpx
	}

	.goods {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-top: 12rpx;
		box-sizing: border-box;
		padding: 0 30rpx;
	}

	.price {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		font-size: 24rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #F83535;
	}

	.price>view text {
		font-size: 36rpx;

		font-weight: bold;

	}

	.price>text {
		font-size: 22rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #333333;
	}

	.imgbg {
		display: flex;
		align-items: center;
	}

	.imgbg .dian {
		width: 30rpx;
		height: 8rpx;
	}

	.imgbg image {
		width: 100rpx;
		height: 100rpx;
		border-radius: 10rpx;
		/* background: #18BC37; */
		margin-right: 10rpx;
	}

	.center {
		position: fixed;
		right: 0rpx;
		bottom: 180rpx;
		width: 150rpx;
		height: 144rpx;
		z-index: 6;

	}

	.center image {
		width: 100%;
		height: 100%;
	}

	.content {
		width: 100%;
		/* 	height: 100vh;
		background: #FFFFFF;
 */
	}

	.nomore {
		display: flex;
		flex-direction: column;
		align-items: center;
		font-size: 26rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #666666;
		overflow: hidden;
	}

	.nomore image {
		width: 306rpx;
		height: 352rpx;
		margin-top: 90rpx;
	}

	.nomore text:nth-of-type(1) {
		font-size: 34rpx;
		font-family: Microsoft YaHei;
		font-weight: bold;
		color: #333333;
		margin-bottom: 30rpx;
	}

	page {
		background: #F5F5F5;
	}

	.title {
		width: 750rpx;
		height: 100rpx;
		background: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: space-between;
		font-size: 26rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #666666;
		box-sizing: border-box;
		padding: 0 30rpx;
		position: fixed;
		top: 0;
		z-index: 4;
	}

	.active {
		position: relative;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.active text {
		font-size: 26rpx;
		font-family: Microsoft YaHei;
		font-weight: bold;
		color: #333333;
	}

	.active::after {
		content: '';
		width: 50rpx;
		position: absolute;
		height: 8rpx;
		background: linear-gradient(64deg, #2BCCA5, #22B591);
		border-radius: 4rpx;
		top: 44rpx;
	}
</style>
